package com.xzh.model;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;

import java.util.Date;

@Getter
@Setter
@TableName("student_appointments")
public class Appointment {
    @TableId(type = IdType.AUTO)
    private Integer appointmentId;
    
    private Integer studentId;
    private Integer courseId;
    private Integer scheduleId;
    private Date appointmentTime;
    private String appointmentStatus;
    
    private Date createTime;
    private Date updateTime;

    public Appointment(Long studentId, Long scheduleId, Long courseId) {
        this.studentId = Math.toIntExact(studentId);
        this.scheduleId = Math.toIntExact(scheduleId);
        this.courseId = Math.toIntExact(courseId);
    }

    public Appointment(Integer studentId, Integer scheduleId, int courseId, Date appointmentTime, String appointmentStatus) {
        this.studentId = studentId;
        this.scheduleId = scheduleId;
        this.courseId = courseId;
        this.appointmentTime = appointmentTime;
        this.appointmentStatus = appointmentStatus;
    }
}
